package com.jk.blog.model;

public class ResponseInfo {

    public static final ResponseInfo SUCCESS = new ResponseInfo(1, "成功");
    public static final ResponseInfo ERROR = new ResponseInfo(1000000, "失败");
    public static final ResponseInfo EMPTY_PARAMETER = new ResponseInfo(1000001, "参数异常");

    public static final ResponseInfo ACCOUNT_PARAMETER_ERROR = new ResponseInfo(2000001, "账号或密码未输入");
    public static final ResponseInfo ACCOUNT_ERROR = new ResponseInfo(2000002, "账号或密码有误");

    private Integer resCode;

    private String resMessage;

    private Object data;

    public ResponseInfo(){
        super();
    }

    public ResponseInfo(ResponseInfo res){
        super();
        this.resCode = res.getResCode();
        this.resMessage = res.getResMessage();
    }

    public ResponseInfo(ResponseInfo res, Object obj){
        super();
        this.resCode = res.getResCode();
        this.resMessage = res.getResMessage();
        this.data = obj;
    }

    public ResponseInfo(int resCode, String resMessage){
        super();
        this.resCode = resCode;
        this.resMessage = resMessage;
    }

    public ResponseInfo(int resCode, String resMessage, Object obj){
        super();
        this.resCode = resCode;
        this.resMessage = resMessage;
        this.data = obj;
    }


    public Integer getResCode() {
        return resCode;
    }

    public void setResCode(Integer resCode) {
        this.resCode = resCode;
    }

    public String getResMessage() {
        return resMessage;
    }

    public void setResMessage(String resMessage) {
        this.resMessage = resMessage;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
